home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 June / PCpro_2006_06.ISO / files / mstools / WM Components 2.0.2.dmg / Flip4Mac WMV.mpkg / Contents / Resources / postflight < prev    next >
Encoding:
Text File  |  2006-02-21  |  1.8 KB  |  39 lines

  1. #!/bin/sh
  2.  
  3. flip4MacFolder="/Applications/Flip4Mac"
  4.  
  5. # Create an alias (soft link) to the Preference Pane in the Flip4Mac folder
  6. prefPanesPath="/Library/PreferencePanes"
  7. prefPaneName="Flip4Mac WMV.prefPane"
  8. if [ -d "$prefPanesPath/$prefPaneName" ] ; then 
  9.     /bin/ln -fs "$prefPanesPath/$prefPaneName" "$flip4MacFolder/WMV Upgrade"
  10. fi
  11.  
  12. # Copy the Users Guide to the Flip4Mac folder (copy instead of creating a symlink because the Finder gets upset)
  13. userGuidePath="/Library/QuickTime/Flip4Mac WMV Export.component/Contents/Resources"
  14. userGuide="Flip4Mac WMV User Guide.pdf"
  15. if [ -f "$userGuidePath/$userGuide" ] ; then 
  16.     /bin/cp -f "$userGuidePath/$userGuide" "$flip4MacFolder/$userGuide"
  17. fi
  18.  
  19.  
  20. # Create an entry in the LaunchServices plist to allow mms URLs to go to WMV Player
  21. defaults write com.apple.LaunchServices LSHandlers -array-add '<dict><key>LSHandlerRoleAll</key><string>net.telestream.wmvplayerapp</string><key>LSHandlerURLScheme</key><string>mms</string></dict>'
  22.  
  23. # Touch the component and the QueecksTime folder to help QuickTime know that something has changed
  24. qtFolder="/Library/QuickTime/"
  25. qtComponent="Flip4Mac WMV Import.component"
  26. touch "$qtFolder"
  27. if [ -d "$qtFolder$qtComponent" ] ; then
  28.     touch "$qtFolder$qtComponent"
  29. fi
  30.  
  31. # Tell the user that that they should quit all QuickTime apps after installing
  32. osascript -e "tell application \"Installer\" to display alert \"You should quit and relaunch all applications that use QuickTime after installing Flip4Mac WMV.\" message \"QuickTime applications cannot take advantage of Flip4Mac WMV features until they are relaunched.\"" ||
  33. osascript -e "tell application \"Installer\" to display dialog \"You should restart your system after installing, and before attempting to use Flip4Mac WMV.\""
  34.  
  35. # Open the folder containing the newly installed apps, user guide, and all that
  36. open "$flip4MacFolder"
  37.  
  38. exit 0
  39.